import type { ColumnType } from 'ant-design-vue/lib/table'

export const tableColumns: ColumnType[] = [
  {
    title: '序号',
    key: 'index',
    customRender: ({ index }) => index + 1
  },
  { title: '产品名称', dataIndex: 'productName', align: 'center' },
  { title: '产品规格', dataIndex: 'productSpecification', align: 'center' },
  { title: '包装规格', dataIndex: 'productPacking', align: 'center' },
  { title: '产品保质期', dataIndex: 'productShelfLife', align: 'center' },
  { title: '产品条码', dataIndex: 'productUniqueCode', align: 'center' },
  { title: '总价', key: 'purchasingTotal', align: 'center' },
  { title: '价格', dataIndex: 'productPrice', align: 'center' },
  { title: '数量', dataIndex: 'productNumber', align: 'center' },
  { title: '备注', dataIndex: 'remark', align: 'center' },
  { title: '操作', key: 'action', align: 'center' }
]

export const scanTableColumns: ColumnType[] = [
  {
    title: '序号',
    key: 'index',
    customRender: ({ index }) => index + 1
  },
  { title: '产品名称', dataIndex: 'productName', align: 'center' },
  { title: '产品数量', dataIndex: 'productNumber', align: 'center' },
  { title: '产品扫描码', dataIndex: 'scanCode', align: 'center' },
  { title: '扫描码类型', dataIndex: 'scanCodeType', align: 'center' }
]

export const scanCodeTypeObj = [
  { value: 1, label: '包装码' },
  { value: 2, label: '产品码' }
]
